
#https://www.cnblogs.com/yuanjunyan/p/15044381.html

def _init():  # 初始化
    global _global_dict
    _global_dict = {}

def set_value(key, value):
    #global _global_dict
    #定义一个全局变量
    _global_dict[key] = value

def get_value(key):
    global _global_dict
    #获得一个全局变量，不存在则提示读取对应变量失败
    try:
        return _global_dict[key]
    except:
        return None
        #print('读取'+key+'失败\r\n')

#_init()
#set_value('test', "sasdf")
#print(get_value('test'))